{# @sw-package framework #}
{% block base_doctype %}<!DOCTYPE html>{% endblock %}

{% block base_html %}
<html lang="{{ context.languageInfo.localeCode }}"
      itemscope="itemscope"
      itemtype="https://schema.org/WebPage">
{% endblock %}

{# Set variable to "true" to enable HMR (hot page reloading) mode #}
{% set isHMRMode = app.request.headers.get('hot-reload-mode') and app.environment == 'dev' %}

{% block base_head %}
    {% sw_include '@Storefront/storefront/layout/meta.html.twig' %}
{% endblock %}

{% block base_body %}
    <body class="{% block base_body_classes %}is-ctl-{% if controllerName is not empty %}{{ controllerName|lower }}{% endif %} is-act-{% if controllerAction is not empty %}{{ controllerAction|lower }}{% endif %}{% endblock %}">

    {% block base_body_skip_to_content %}
        {% sw_include '@Storefront/storefront/component/skip-to-content.html.twig' with {
            skipToSearch: true,
            skipToMainNav: true
        } %}
    {% endblock %}

    {% block base_body_inner %}
        {% block base_noscript %}
            <noscript class="noscript-main">
                {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
                    type: 'info',
                    content: 'general.noscriptNotice'|trans|sw_sanitize,
                    iconCache: false
                } %}
            </noscript>
        {% endblock %}

        {% block base_esi_header %}
            {{ render_esi(url('frontend.header', { headerParameters: headerParameters }), { ignore_errors: false } ) }}
        {% endblock %}

        {# @deprecated tag:v6.8.0 - Block will be removed. The active styling class `.active` is set by navbar.plugin.js. #}
        {% block base_navigation_styling %}
            {# @deprecated tag:v6.8.0 - File will be removed. The active styling class `.active` is set by navbar.plugin.js. #}
            {% sw_include '@Storefront/storefront/layout/navigation/active-styling.html.twig' %}
        {% endblock %}

        {% block base_main %}
            <main class="content-main" id="content-main">
                {% block base_flashbags %}
                    <div class="flashbags container">
                        {% for type, messages in app.flashes %}
                            {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with { type: type, list: messages } %}
                        {% endfor %}
                    </div>
                {% endblock %}

                {% block base_main_inner %}
                    <div class="container">
                        {% block base_main_container %}
                            <div class="container-main">
                                {% block base_breadcrumb %}
                                    {% sw_include '@Storefront/storefront/layout/breadcrumb.html.twig' with {
                                        context: context,
                                        themeIconConfig: themeIconConfig,
                                        categoryId: shopware.navigation.id,
                                    } only %}
                                {% endblock %}

                                {% block base_content %}{% endblock %}
                            </div>
                        {% endblock %}
                    </div>
                {% endblock %}
            </main>
        {% endblock %}

        {% block base_esi_footer %}
            {{ render_esi(url('frontend.footer', { footerParameters: footerParameters }), { ignore_errors: false } ) }}
        {% endblock %}

    {% endblock %}

    {% block base_scroll_up %}
        {% sw_include '@Storefront/storefront/layout/scroll-up.html.twig' %}
    {% endblock %}

    {% block base_cookie_permission %}
        {% sw_include '@Storefront/storefront/layout/cookie/cookie-permission.html.twig' %}
    {% endblock %}

    {% block base_pseudo_modal %}
        {% sw_include '@Storefront/storefront/component/pseudo-modal.html.twig' %}
    {% endblock %}

    {% block base_speculation_rules %}
        {% if config('core.storefrontSettings.speculationRules') %}
            {% set options = {
                selectorNavigationLinks: '.nav-item.nav-link',
            } %}
            <template data-speculation-rules="true" data-speculation-rules-options="{{ options|json_encode }}"></template>
        {% endif %}
    {% endblock %}

    {% block base_body_script %}
    {% endblock %}
    </body>
{% endblock %}
</html>
